﻿<div bsModal #createOrEditModal="bs-modal" (onShown)="onShown()" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="createOrEditModal" aria-hidden="true" [config]="{backdrop: 'static', keyboard: !saving}">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <form *ngIf="active" #userForm="ngForm" novalidate (ngSubmit)="save()" autocomplete="off">
                <div class="modal-header">
                    <h4 class="modal-title">
                        <span *ngIf="formData.id">编辑</span>
                        <span *ngIf="!formData.id">新建</span>
                    </h4>
                    <button type="button" class="close" (click)="close()" [attr.aria-label]="l('Close')" [disabled]="saving">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">
                    <tabset class="tab-container tabbable-line">
                        <tab heading="任务信息" customClass="m-tabs__item">
                            <div class="row">
                                <div class="col-sm-6">
                                    <div class="form-group">
                                        <label for="taskNumber">任务号 *</label>
                                        <input id="taskNumber" #taskNumberInput="ngModel" class="form-control" type="text" name="code" [(ngModel)]="formData.taskNumber" required maxlength="255">
                                        <validation-messages [formCtrl]="taskNumberInput"></validation-messages>
                                    </div>
                                </div>
                                <div class="col-sm-6">
                                    <div class="form-group">
                                        <label for="standardPartsDetailId">编码 *</label>
                                        <input id="standardPartsDetailId" #nameInput="ngModel" type="text" name="standardPartsDetailId" class="form-control" [(ngModel)]="formData.standardPartsDetailId" maxlength="255">
                                        <validation-messages [formCtrl]="nameInput"></validation-messages>
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-sm-6">
                                    <div class="form-group">
                                        <label for="displayName">名称 *</label>
                                        <input id="displayName" #displayNameInput="ngModel" type="text" name="displayName" class="form-control" [(ngModel)]="formData.features.displayName" required maxlength="256"/>
                                        <validation-messages [formCtrl]="displayNameInput"></validation-messages>
                                    </div>
                                </div>
                                <div class="col-sm-6">
                                    <div class="form-group">
                                        <label for="standardNumber">标准 *</label>
                                        <input id="standardNumber" #standardNumberInput="ngModel" type="text" name="standardNumber" class="form-control" [(ngModel)]="formData.features.standardNumber" maxlength="255">
                                        <validation-messages [formCtrl]="standardNumberInput"></validation-messages>
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-sm-6">
                                    <div class="form-group">
                                        <label for="specification">规格 *</label>
                                        <input id="specification" #specificationInput="ngModel" type="text" name="specification" class="form-control" [(ngModel)]="formData.features.specification" required maxlength="255">
                                        <validation-messages [formCtrl]="specificationInput"></validation-messages>
                                    </div>
                                </div>
                                <div class="col-sm-6">
                                    <div class="form-group">
                                        <label for="materials">材料 *</label>
                                        <input id="materials" #materialsInput="ngModel" type="text" name="materials" class="form-control" [(ngModel)]="formData.features.materials" required maxlength="255">
                                        <validation-messages [formCtrl]="materialsInput"></validation-messages>
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-sm-6">
                                    <div class="form-group">
                                        <label for="price">投产数量 *</label>
                                        <input id="price" #priceInput="ngModel" type="text" name="quantity" class="form-control"  [(ngModel)]="formData.quantity" required maxlength="255">
                                        <validation-messages [formCtrl]="priceInput"></validation-messages>
                                    </div>
                                </div>
                                <div class="col-sm-6">
                                    <div class="form-group">
                                        <label for="fieldDate">投产时间 *</label>
                                        <input id="fieldDate" #fieldDateInput="ngModel" type="text" name="fieldDate" class="form-control"  [(ngModel)]="fieldDate" required maxlength="32" bsDatepicker>
                                        <validation-messages [formCtrl]="fieldDateInput"></validation-messages>
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-sm-6">
                                    <div class="form-group">
                                        <label for="price">创建人 *</label>
                                        <input id="price" #priceInput="ngModel" type="text" name="price" class="form-control" [(ngModel)]="formData.field_k" required maxlength="255">
                                        <validation-messages [formCtrl]="priceInput"></validation-messages>
                                    </div>
                                </div>
                                <div class="col-sm-6">
                                    <div class="form-group">
                                        <label for="explain">备注 *</label>
                                        <input id="explain" #explainInput="ngModel" type="text" name="explain" class="form-control" [(ngModel)]="formData.explain" required maxlength="1000">
                                        <validation-messages [formCtrl]="explainInput"></validation-messages>
                                    </div>
                                </div>
                            </div>
                        </tab>
                    </tabset>
                </div>
                <div class="modal-footer">
                    <button [disabled]="saving" type="button" class="btn btn-default" (click)="close()">{{"Close" | localize}}</button>
                    <!--<button type="submit" class="btn btn-primary" [disabled]="!userForm.form.valid" [buttonBusy]="saving" [busyText]="l('SavingWithThreeDot')"><i class="fa fa-save"></i> <span>{{"Save" | localize}}</span></button>-->
                </div>
            </form>
        </div>
    </div>
</div>
